﻿// <copyright file="ActionCategoryMove.cs" company="Auros Ltd.">
//     Copyright (c) Auros Ltd. All rights reserved.
// </copyright>

namespace Auros.Categorisation.Umbraco
{
    /// <summary>
    /// Class defining the category sorting action.
    /// </summary>
    public class ActionCategoryMove : umbraco.interfaces.IAction
    {
        private static readonly ActionCategoryMove instance = new ActionCategoryMove();

        /// <summary>
        /// Gets a new instance of the action.
        /// </summary>
        /// <value>The action instance.</value>
        public static ActionCategoryMove Instance
        {
            get
            {
                return instance;
            }
        }

        /// <summary>
        /// Gets the action alias.
        /// </summary>
        /// <value>The action alias.</value>
        public string Alias
        {
            get { return "catMove"; }
        }

        /// <summary>
        /// Gets a value indicating whether this instance can be permission assigned.
        /// </summary>
        /// <value><c>True</c> if this instance can be permission assigned; otherwise, <c>false</c>.</value>
        public bool CanBePermissionAssigned
        {
            get { return true; }
        }

        /// <summary>
        /// Gets the action icon.
        /// </summary>
        /// <value>The action icon.</value>
        public string Icon
        {
            get { return ".sprMove"; }
        }

        /// <summary>
        /// Gets the name of the JavaScript function.
        /// </summary>
        /// <value>The name of the JavaScript function.</value>
        public string JsFunctionName
        {
            get { return "OpenCategoryMover();"; }
        }

        /// <summary>
        /// Gets the path to a supporting JavaScript file for the IAction. A script tag will be rendered out with the reference to the JavaScript file.
        /// </summary>
        /// <value>The path to a supporting JavaScript file for the IAction.</value>
        public string JsSource
        {
            get { return "/umbraco/plugins/Categorisation/Scripts/CategoryMove.js"; }
        }

        /// <summary>
        /// Gets the letter.
        /// </summary>
        /// <value>The letter.</value>
        public char Letter
        {
            get { return 'm'; }
        }

        /// <summary>
        /// Gets a value indicating whether [show in notifier].
        /// </summary>
        /// <value><c>True</c> if [show in notifier]; otherwise, <c>false</c>.</value>
        public bool ShowInNotifier
        {
            get { return false; }
        }
    }
}